﻿<UserControl xmlns:thn="clr-namespace:Thn.Presentation.Controls;assembly=Thn.Presentation.Silverlight"  x:Class="Demo.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="600" d:DesignWidth="600">

    <Grid x:Name="LayoutRoot" Background="White">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        
        <TextBlock FontSize="18">SILVERLIGHT CONTROLS DEMO</TextBlock>
        <StackPanel Grid.Row="1" Margin="20,0,0,0">
            <TextBlock Margin="0,20,0,0" FontWeight="Bold">Math Label</TextBlock>
            <TextBlock>This control is useful for displaying simple formulas. Supported: subscript, superscript</TextBlock>
            <thn:MathLabel>y = ax^2^ + bx + c</thn:MathLabel>
            <thn:MathLabel>(x + y)^(2a + b)^ = some thing</thn:MathLabel>
            <thn:MathLabel>H_2_O + (CH)_3_COOH + some fruits + some greens -> yum yum</thn:MathLabel>

            <TextBlock FontWeight="Bold" Margin="0,20,0,0">Run On UI</TextBlock>
            <TextBlock>When running a threaded operation, it is super convenient to simply invoke a delegate on UI thread.</TextBlock>
            <Button Width="100" HorizontalAlignment="Left" x:Name="btnRun" Click="btnRun_Click">Run me</Button>
            

            <TextBlock FontWeight="Bold" Margin="0,20,0,0">Number Box</TextBlock>
            <TextBlock>This control accepts only numeric inputs. Common properties: MinValue, MaxValue, AcceptDecimals</TextBlock>
            <thn:NumberBox Width="150" HorizontalAlignment="Left"/>

            <TextBlock FontWeight="Bold" Margin="0,20,0,0">Number Label</TextBlock>
            <TextBlock>A simple label useful for displaying numeric values.</TextBlock>
            <thn:NumberLabel x:Name="lblNumber" Format="#,#0.#####" Width="100" HorizontalAlignment="Left"/>

            <TextBlock FontWeight="Bold" Margin="0,20,0,0">Table</TextBlock>
            <TextBlock>A simple control to quickly create tables.</TextBlock>
            <thn:Table x:Name="tb" Width="250" Height="200" HorizontalAlignment="Left" BorderStroke="Black">
                <thn:Table.Columns>
                    <thn:TableColumn Width="100" Title="Column 1"/>
                    <thn:TableColumn Width="150" Title="Column 2"/>
                </thn:Table.Columns>
                <thn:Table.Rows>
                </thn:Table.Rows>
            </thn:Table>
        </StackPanel>
    </Grid>
</UserControl>
